<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <!-- 引入layui 样式-->
    <link rel="stylesheet" href="../../static/css/style.css"/>
    <link rel="stylesheet" href="../../static/layer/css/layui.css"/>
    <link rel="stylesheet" href="../../static/css/font-awesome.min.css">
    <link rel="stylesheet" href="../../static/ucss/contract/contract.css"/>
    <script type="text/javascript" src="../../static/layer/layui.js"></script>
    <style>
        .blockquote-bottom {
            width: 100%;
            position: fixed;
            margin: 0;
            bottom: 0;
            left: 0;
            text-align: center;
            background-color: #ffffff;
            border-top: 1px solid #f4f4f4;
            z-index: 2;
        }
        .blockquote-bottom-item {
            margin: 15px 0;
        }
    </style>
</head>
<body>
<form class="layui-form" action="">
    <div class="layui-tab layui-tab-brief" lay-filter="contractInfoTabBrief">
        <div class="layui-tab-content">
            <div class="tab-body">
                <div>
                    <div class="quote-submit-person">
                        <!--<div class="layui-col-md4">
                            <label class="layui-form-label">时间:</label>
                            <div class="layui-input-inline">
                                <input type="text" name="" class="layui-input" id="contract-finish-date" placeholder="yyyy-MM-dd">
                            </div>
                        </div>-->
                        <!-- <hr>-->
                        <div class="layui-col-md12">
                            <label class="layui-form-label">楼盘:</label>
                            <div class="layui-input-inline room-select">
                                <input type="text" name="room" lay-verify="" autocomplete="off"
                                       class="layui-input">
                                <!--<div id="room-select-box-container" class="room-select-box-container">-->
                                   <!-- <div class="displayflex">
                                        <dl class="box-container business-box-container">
                                        </dl>
                                        <dl class="box-container building-box-container">
                                        </dl>
                                        &lt;!&ndash;        <label class="layui-form-label">楼盘编号:</label>
                                                <div class="layui-input-inline room-select">
                                                    <select name="" lay-filter="room">
                                                        <option value=""></option>
                                                        <option value="0">楼盘一</option>
                                                        <option value="1">楼盘二</option>
                                                    </select>
                                                </div>
                                                <span style="color: red">*</span>&ndash;&gt;
                                    </div>-->
                                <!--</div>-->
                            </div>
                        </div>
                    </div>
                    <div class="quote-housing-info">
                        <div class="quote-title">
                            <i class="fa fa-circle-o" aria-hidden="true"></i>
                            <span>承租人信息</span>
                        </div>
                        <div class="layui-form-item">
                            <div class="room-box-arr clone-box-container">
                                <div class="layui-col-xs6">
                                    <label class="layui-form-label">公司:</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="COMPANY" lay-verify="" autocomplete="off"
                                               class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-col-xs6">
                                    <div class="layui-inline">
                                        <label class="layui-form-label">行业:</label>
                                        <div class="layui-input-inline">
                                            <select name="TRADE" lay-verify="required" lay-search="">
                                                <option value="">请选择行业</option>
                                                <option value="1">软件开发</option>
                                                <option value="2">楼房销售</option>
                                                <option value="3">楼房租聘</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-col-xs6">
                                <label class="layui-form-label">时间:</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="FIR_VISIT_DATE" class="layui-input" id="FIR_VISIT_DATE">
                                </div>
                            </div>
                            <div class="layui-col-xs6">
                                <div class="layui-inline">
                                    <label class="layui-form-label">优质客户:</label>
                                    <div class="layui-input-inline">
                                        <select name="QUA_CUS" lay-verify="required" lay-search="">
                                            <option value="1">是</option>
                                            <option value="2">否</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-col-xs6">
                                <label class="layui-form-label">联系人:</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="CONTACT" lay-verify="" autocomplete="off"
                                           class="layui-input">
                                </div>
                            </div>
                            <div class="layui-col-xs6">
                                <label class="layui-form-label">联系方式:</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="CONTACT_TEL" lay-verify="" autocomplete="off"
                                           class="layui-input">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-col-xs6">
                                <label class="layui-form-label">法人 :</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="LEG_REN" lay-verify="" autocomplete="off"
                                           class="layui-input">
                                </div>
                            </div>
                            <div class="layui-col-xs6">
                                <label class="layui-form-label">联系方式:</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="LEG_TEL" lay-verify="" autocomplete="off"
                                           class="layui-input">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-col-xs6">
                                <label class="layui-form-label">签订人 :</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="SIGN_REN" lay-verify="" autocomplete="off"
                                           class="layui-input">
                                </div>
                            </div>
                            <div class="layui-col-xs6">
                                <label class="layui-form-label">联系方式:</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="SIGN_TEL" lay-verify="" autocomplete="off"
                                           class="layui-input">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-col-xs6">
                                <label class="layui-form-label">执照编号:</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="BUSS_CODE" lay-verify="" autocomplete="off"
                                           class="layui-input">
                                </div>
                            </div>
                            <div class="layui-col-xs6">
                                <label class="layui-form-label">通讯地址:</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="ADDRESS" lay-verify="" autocomplete="off"
                                           class="layui-input">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="quote-title">
                                <i class="fa fa-circle-o" aria-hidden="true"></i>
                                <span>意向房源</span>
                            </div>
                            <div class="room-box-arr clone-box-container">
                                <!-- <div class="room-box clone-box" data-index="0">-->
                                <div class="layui-form-item">
                                    <div class="room-box-arr clone-box-container">
                                        <div class="layui-col-xs6">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">来访途径:</label>
                                                <div class="layui-input-inline">
                                                    <select name="ALL_WAY" lay-verify="required" lay-search="">
                                                        <option value="">请选择途径</option>
                                                        <option value="1">上门</option>
                                                        <option value="2">电话</option>
                                                        <option value="3">途径三</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-col-xs6">
                                            <label class="layui-form-label">需求面积:</label>
                                            <div class="layui-input-inline">
                                                <input type="text" name="DEMAN_AREA" lay-verify="" autocomplete="off"
                                                       class="layui-input">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-col-xs6">
                                    <label class="layui-form-label">跟进时间:</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="FOLLOW_DATE" class="layui-input" id="FOLLOW_DATE">
                                    </div>
                                </div>
                                <div class="layui-col-xs6">
                                    <label class="layui-form-label">租赁顾问:</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="LEAS_CONS" lay-verify="" autocomplete="off"
                                               class="layui-input">
                                    </div>
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <div class="quote-title">
                                    <i class="fa fa-circle-o" aria-hidden="true"></i>
                                    <span>当前状态</span>
                                </div>
                                <div class="room-box-arr clone-box-container">
                                    <div class="room-box clone-box" data-index="0">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">客户状态</label>
                                            <div class="layui-input-block">
                                                <input type="radio" name="CUS_STATUS" value="未分类" title="未分类"
                                                       checked="">
                                                <input type="radio" name="CUS_STATUS" value="潜在客户" title="潜在客户">
                                                <input type="radio" name="CUS_STATUS" value="意向客户" title="意向客户">
                                                <input type="radio" name="CUS_STATUS" value="成交用户" title="成交用户">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-col-xs6">
                                                <div class="layui-form-item layui-form-text">
                                                    <label class="layui-form-label">客户备注</label>
                                                    <div class="layui-input-block">
                                                        <textarea placeholder="请输入内容" name="CUS_INFO"
                                                                  class="layui-textarea"
                                                                  style="width: 500px"></textarea>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item blockquote-bottom">
            <div class="blockquote-bottom-item">
                <button class="layui-btn" lay-filter="demo1"  lay-submit="">提交</button>
               <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </div>
    </div>
    </div>
</form>
</body>
<script type="text/javascript" src="../../static/js/common/dateUtils.js"></script>
<!--<script type="text/javascript" src="../../static/ujs/customer/contract_add.js"></script>-->
<script>
    var $ = '';
    layui.use(['jquery', 'form', 'layer', 'laydate'], function(){
        var form = layui.form
            ,layer = layui.layer
            ,$ = layui.jquery;
        laydate = layui.laydate;
        laydate.render({
            elem: '#FIR_VISIT_DATE'
            , format: 'yyyy-MM-dd'
        });
        laydate.render({
            elem: '#FOLLOW_DATE'
            , format: 'yyyy-MM-dd'
        });


        //监听提交
        form.on('submit(demo1)', function(data){
            //console.log(data.field);
            var data1=data.field;
            layer.msg('确认新建客户吗', {
                time: 0
                , btn: ['确定', '取消']
                , shade: 0.3
                , yes: function (data) {
                    $.ajax({
                        url: "/customer/save",
                        data: data1,
                        type: "Post",
                        dataType: "json",
                        async: false,
                        success: function (res) {
                            if (res.errcode === "0") {
                                var index = parent.layer.getFrameIndex(window.name); // 先得到当前iframe层的索引
                                parent.layer.close(index); // 再执行关闭
                                parent.reloadTablezs();// 父页面表格刷新
                                layer.msg("保存成功");
                            }
                        }
                    });
                },
            })
            return false;
        });
        return false;
    });
</script>
</html>